import http from "../utils/http";
const systemApi = {
    //账号管理
    getAccount(id) {
        return http({
            url: '/system/account/userInfo',
            method: 'get',
            params: {
                userId: '6'
            }
        })
    },
    //权限管理
    // 查询所有用户
    getAdmin() {
        return http({
            url: '/system/AdminPower/getAllAdminInfo',
            method: 'get'
        })
    },
    // 所属角色的下拉框
    roleDown() {
        return http({
            url: '/system/AdminPower/getAllRole',
            method: 'get'
        })
    },
    //修改的请求
    revise(value) {
        return http({
            url: '/system/AdminPower/updateAdminUser',
            method: 'post',
            data: value
        })
    },
    //删除的请求
    deleteData(id) {
        return http({
            url: '/system/AdminPower/deleteAdminUser',
            method: 'post',
            data: {
                userId: id
            }
        })
    },
    //增加请求
    addAdmin(value) {
        return http({
            url: '/system/AdminPower/insertUserAdmin',
            method: 'post',
            data: value
        })

    },
    //新增角色
    roleAdd(value) {
        return http({
            url: '/system/AdminPower/insertRole',
            method: 'post',
            data: value
        })
    },
    //搜索
    power(inputValue) {
        return http({
            url: '/system/AdminPower/getOneAdminPower',
            method: 'get',
            params: {
                roleName: inputValue
            }
        })
    },
    // 系统日志管理
    //获取系统日志
    getLog() {
        return http({
            url: '/system/logInfo/getAllLogInfo',
            method: 'get'
        })
    },
    //查询系统日志
    LogQuerry(obj) {
        return http({
            url: '/system/logInfo/getLogInfo',
            method: 'post',
            data: obj
        })
    },
    //所属位置下拉框
    Logpark() {
        return http({
            url: '/system/logInfo/getLogLocation',
            method: 'get'
        })

    },
    //日志类型下拉框
    Logdown() {
        return http({
            url: '/system/logInfo/getLogType',
            method: 'get'
        })
    },
    getTree(value) {
        return http({
            url: '/system/AdminPower/getOneAdminPower',
            method: 'get',
            params: {
                roleName: value
            }
        })
    }

}
export default systemApi